package edu.zut.cs.network;

import java.util.Scanner;

public  class WhileDemo {
    /*
     * @param args
     * 功能：成绩在90-100为优秀，60-89为合格，0-59为不合格。
     */
    public static void main(String[] args) {
        int count = 1;
        while (count <= 10) {
//        成绩评定
            int score;
            System.out.println("请输入第"+count+"个同学的课程成绩：");
            Scanner input = new Scanner(System.in);
            score = input.nextInt();

            if (score >= 0 && score <= 100) {
                if (score >= 90)
                    System.out.println("优秀");
                else if (score >= 60)
                    System.out.println("合格");
                else
                    System.out.println("不合格");

            } else
                System.out.println("你输入的成绩不合法");
            count++;
        }
    }
}


